<template>
  <view>
    <!--    <cu-custom  :isBack="true" style="color: white;background-color:#DAA520 ">-->
    <!--&lt;!&ndash;      <block slot="backText">返回</block>&ndash;&gt;-->
    <!--&lt;!&ndash;      <block slot="content">首页</block>&ndash;&gt;-->
    <!--      <block slot="content">-->
    <!--        -->
    <!--      </block>-->

    <!--    </cu-custom>-->
    <index-search></index-search>
    <scroll-view scroll-y class="indexes" :scroll-with-animation="true" :enable-back-to-top="true">
      <index-swipper></index-swipper>
      <index-tools></index-tools>
      <view class="number" @tap.stop="redistVipUser">
        <view class="txt">恭喜成为梵好新会员，快来领取新人礼包 ></view>
        <img class="hg-img" src="../../static/images/hg.png" />
      </view>
      <index-exchange-swapper></index-exchange-swapper>
      <view class="jg"></view>
      <index-exchange></index-exchange>
      <!-- <index-msg></index-msg> -->
<!--      <index-order-stastic></index-order-stastic>-->
      <view class="jg"></view>
      <view class="margin-sm">
        <view class="hydt">好友动态</view>
        <view class="flex">
          <img class="tx-img" src="../../static/images/tx1.png" />
          <view class="tx-txt">
            <view class="tx1">温柔小时光</view>
            <view class="cu-tag tx2 round">&nbsp;&nbsp;22岁&nbsp;&nbsp;</view>
          </view>
        </view>
        <view class="jrkl">今日快乐~</view>
        <view class="flex">
          <img class="k-img flex-sub" src="https://fanhaoapp.oss-cn-nanjing.aliyuncs.com/1723710574732.png" />
          <img class="k-img flex-sub" src="https://fanhaoapp.oss-cn-nanjing.aliyuncs.com/1723710640153.png" />
          <img class="k-img flex-sub" src="https://fanhaoapp.oss-cn-nanjing.aliyuncs.com/1723710673868.png" />
        </view>
        <view class="db flex">
          <view class="cuIcon-attention padding-right-sm">&nbsp;收藏</view>
          <view class="cuIcon-favor">&nbsp;浏览人数：25人</view>
        </view>
        <view style="height: 50rpx"></view>
      </view>
    </scroll-view>
  </view>
</template>

<script setup lang="ts">

import {onMounted, computed, reactive, ref} from 'vue'
import {onLoad, onReady, onShow,onLaunch} from '@dcloudio/uni-app';
import {redirectLoginPage} from '@/common/utils/redirectPage'

import {useStore} from "@/common/store";
import IndexTools from "./IndexTools.vue";
import IndexMsg from "./IndexMsg.vue";
import IndexOrderStastic from "./indexOrderStastic.vue";
import IndexSearch from "./indexSearch.vue";
import IndexSwipper from "./indexSwipper.vue";
import IndexExchange from "./indexExchange.vue";
import IndexExchangeSwapper from "./indexExchangeSwapper.vue";
const store = useStore();

const token = computed(() => store.token)
const userId = computed(() => store.userId)


const redistVipUser = () => {
  uni.showToast({
    title: '功能正在开发中，敬请期待',
    duration: 2000,
    icon: 'none'
  });
}


onShow(() => {
  // if ((!userId.value) || userId.value == 0) {
  //   redirectLoginPage(false, '/pages/home/index');
  // }
})



</script>

<style lang="scss" scoped>
//.page {
//  height: 50Vh;
//  width: 100vw;
//}
.cuIcon-attention{font-size: 22rpx;}
.cuIcon-favor{font-size: 22rpx;}

.indexes {
  height: 100vh;
  margin-top: 100rpx;
  position: relative;
}

.number{
width: 693rpx;
height: 92rpx;
background: #2F2E3E;
border-radius: 8rpx 8rpx 25% 25%;
  position: relative;
  margin: 0 auto;
  .txt {

    line-height: 80rpx;
    margin-left: 30rpx;
    font-size: 24rpx;
    color: #FDE1BA;
  }
  .hg-img {
    height: 70rpx;
    width: 60rpx;
    position: absolute;
    right: 40rpx;
    top: 10rpx
  }
}

/*scroll-view外层*/
.skill-sequence-panel-content-wrapper {
  position: relative;
  white-space: nowrap;
  //padding: 10rpx 0 10rpx 10rpx;
}


/*左右渐变遮罩*/
.hide-content-box {
  position: absolute;
  top: 0;
  height: 100%;
  width: 10px;
  z-index: 2;
}

.hide-content-box-left {
  left: 0;
  background-image: linear-gradient(to left, rgba(255, 255, 255, 0), #f3f3f3 60%);
}

.hide-content-box-right {
  right: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #f3f3f3 60%);
}

.kite-classify-scroll {
  width: 100%;
  height: 380rpx;
  overflow: hidden;
  white-space: nowrap;
}

.kite-classify-cell {
  display: inline-block;
  width: 266rpx;
  height: 370rpx;
  margin-right: 20rpx;
  background-color: #ffffff;
  border-radius: 10rpx;
  overflow: hidden;
  box-shadow: 2px 2px 3px rgba(26, 26, 26, 0.2);
}


.nav-li {
  padding: 40rpx 30rpx;
  width: 100%;
  background-image: url(https://s1.ax1x.com/2020/06/27/NyU04x.png);
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.nav-name {
  font-size: 28upx;
  text-transform: Capitalize;
  margin-top: 20upx;
  position: relative;
}

.nav-name::before {
  content: '';
  position: absolute;
  display: block;
  width: 40rpx;
  height: 6rpx;
  background: #fff;
  bottom: 0;
  right: 0;
  opacity: 0.5;
}

.nav-name::after {
  content: '';
  position: absolute;
  display: block;
  width: 100rpx;
  height: 1px;
  background: #fff;
  bottom: 0;
  right: 40rpx;
  opacity: 0.3;
}

.nav-content {
  width: 100%;
  padding: 15rpx;
  display: inline-block;
  overflow-wrap: break-word;
  white-space: normal;
}

.nav-btn {
  width: 200rpx;
  height: 60rpx;
  margin: 8rpx auto;
  text-align: center;
  line-height: 60rpx;
  border-radius: 10rpx;
}
.jg {
  width: 100wh;
  background: #F9F9F9;
  height: 20rpx;
}
.hydt {
  font-size: 36rpx;
  color: #232323;
  margin-bottom: 20rpx;
}
.tx-img {
  width: 92rpx;
  height: 92rpx;
}
.tx-txt{
  padding-left: 23rpx;
  .tx1{
    font-size: 30rpx;
    color: #1B1B1B;
  }
  .tx2{
    background: #689DEF;
    color: white;
    font-size: 20rpx;
    font-weight: 500;
    height: 23rpx;
  }
}
.jrkl{

  font-family: PingFang SC;
  font-weight: 500;
  font-size: 30rpx;
  color: #1B1B1B;
  margin: 20rpx 0rpx;

}
.k-img {
  width: 214rpx;
  height: 128rpx;
  border-radius: 20rpx;
  padding: 0 5rpx;
}
.db{
  color: #767676;
  margin-top: 20rpx;
}
</style>
